<?php

/*
 * Niken Larasati
 * larasati.n@students.amikom.ac.id
 */

class kat_pindah extends CI_Controller {

    public function __construct() {
        parent::__construct();
    }

    function form_kat_pindah() {
        $this->template->load('halaman_v', 'form_kat_pindah_v');
    }
    
    function tambah(){
        if($this->input->post('tambah') !=NULL);
        {
            $data['id_kat'] = $this->input->post('id_kat_pindah');
            $data['kategori'] = $this->input->post('kat_pindah');
            
            $this->load->model('umum_m');
            $this->umum_m->tambah('kat_pindah',$data);
            $this->template->load('halaman_v','form_kat_pindah_v');
                      
        }
    }
    
    function ambil_data(){
        $this->load->model('kat_pindah_m');
        $data['data'] = $this->kat_pindah_m->ambil_data();
        $this->template->load('halaman_v','form_kat_pindah_v',$data);

    }

}
